 <%@taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql"%><%@taglib
	uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
	<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<title>Minimalistic Web Template</title>
	<meta  charset="iso-8859-1" />
	<link href="css/style.css" rel="stylesheet" type="text/css" />
	<!--[if IE 6]>
		<link href="css/ie6.css" rel="stylesheet" type="text/css" />
	<![endif]-->
	<!--[if IE 7]>
        <link href="css/ie7.css" rel="stylesheet" type="text/css" />  
	<![endif]-->
	
	<style type="text/css">
	.news-title{
		font-weight:bold;
		float:left;
	}
	.news-short-description{
		font-size:13px;
		margin-left:20px;
		margin-bottom:10px;
		border-bottom:solid #ffffff 1px;
	}
	.view-count{
		font-size:12px;
		margin-left:570px;
	}
	</style>
</head>

<body>
	  <div id="background">
			  <div id="page">
			
					 <div class="header">
						<div class="footer">
							<div class="body">
							  
									<!-- include Menu -->
									<jsp:include page="Menu.jsp" flush = "True">
										<jsp:param name="page_call" value ="HotNews"/>
									</jsp:include>
									
									
									<div id="content" >
									    <img src="images/cotton-flower.jpg" width="726" height="546" alt="" title="">
										<div class="pagetitlebar">Hot news.
											<span style="margin-left:350px;font-size:15px;">
											<c:if test="${sessionScope.User!= null}">
											<a href="UpdateNews.jsp" style="color:#ffffff">Update news</a>
											</c:if>											
											</span>
										</div>
										
										<div class="pagecontent">
											<sql:query var="db" dataSource="jdbc/sharewithme">
												select id,title,CONCAT(left(detail,200),'...') as detail from TBInformation 
												WHERE info_type =4
											</sql:query>
											<c:forEach var="item" items="${db.rows}">
												<div class="news-title"><a href="HotNewsDetail?newsid=${item.id}">${item.title}</a></div>
												<div class="news-short-description"> <br>
													${item.detail}
												</div>
											
											</c:forEach>
										</div>
										
										<p style="height:350px;">&nbsp;</p>
									</div>
						</div>
					 </div>
					 <div class="shadow">&nbsp;</div>
			  </div>    
	  </div>    
	</div>
</body>
</html>
</body>
</html>